Skip to main content

Kenyan ID Check API

Objective

The Kenyan ID Check API validates a Kenyan National ID and retrieves detailed information about the corresponding user.

InputOutput
The user's personal details including their national ID number, full name,date of birth and gender Additional user details. The complete list of output fields is provided under the Success Response Details section.

API Endpoint

kenyanIdCheck

Overview

The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID (appId) and application key (appKey) from HyperVerge to verify your identity for accessing the API.

API Request Details

Method - POST

Headers

ParameterMandatory or OptionalDescriptionAllowed Values
content-type MandatoryThis parameter defines the media type for the request payloadapplication/json
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
transactionIdMandatoryA unique identifier for tracking a user journeyThis should be both unique and easily associated with the user's journey in your application(s)

Inputs

The following table provides the complete information on the parameters used in the request body for the API calls.

ParameterDescriptionMandatory or OptionalAllowed ValuesDefault Value
idThe national ID numberMandatoryType: String Not Applicable
firstNameThe first name of the userMandatoryType: StringNot Applicable
lastNameThe last name of the userMandatoryType: StringNot Applicable
middleNameThe middle name of the userOptionalType: StringNot Applicable
dateOfBirthThe date of birth of the userMandatoryType: String
Format: YYYY-MM-DD
Not Applicable
genderThe gender of the userMandatoryType: StringNot Applicable

Sample Request

The following code shows a standard cURL request for the API.

curl --location --request POST 'https://zaf.thomas.hyperverge.co/v1/kenyanIdCheck' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"id": "<Enter_the_ID_Number>",
"firstName": "<Enter_the_First_Name>",
"lastName": "<Enter_the_Last_Name>",
"middleName": "<Enter_the_Middle_Name>",
"dateOfBirth": "<Enter_the_Date_of_Birth>",
"gender": "<Enter_the_Gender>"
}'

Success Response Sample

The following code is a sample of success response from the API.

{
"status": "success",
"statusCode": "200",
"result": {
"entity": {
"dateOfBirth": "<Date_Of_Birth_in_YYYY-MM-DD_Format>",
"gender": "<Gender>",
"expirationDate": "<Expiration_Date>",
"phoneNumber": "<Phone_Number>",
"phoneNumber2": "<Secondary_Phone_Number>",
"address": "<Address_Of_The_User>",
"secondaryIdNumber": "<Secondary_ID_Number>",
"placeOfBirth": "<Place_Of_Birth>",
"firstName": "<First_Name>",
"serialNumber": "<Serial_Number>",
"citizenship": "<Citizenship>",
"dateOfIssue": "<Date_Of_Issue_in_YYYY-MM-DD_Format>",
"occupation": "<Occupation>",
"family": "<Family_Details>",
"middleName": "<Middle_Name>",
"lastName": "<Last_Name>"
}
},
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}

Success Response Details

ParameterTypeDescription
result.entity.dateOfBirthstringThe date of birth of the user in YYYY-MM-DD format
result.entity.genderstringThe gender of the user
result.entity.expirationDatestringThe expiration date of an identification document or similar item
result.entity.phoneNumberstringThe primary phone number of the user
result.entity.phoneNumber2stringThe secondary phone number of the user
result.entity.addressstringThe residential address of the user
result.entity.secondaryIdNumberstringThe unique identifier for the user, possibly a code or ID number
result.entity.placeOfBirthstringThe place where the user was born
result.entity.firstNamestringThe first name of the user
result.entity.serialNumberstringThe serial number associated with the user
result.entity.citizenshipstringThe Nationality or citizenship status of the user
result.entity.dateOfIssuestringThe date when an identification document or relevant item was issued to the user, in the YYYY-MM-DD format
result.entity.occupationstringThe occupation of the user
result.entity.familystringThe details about the user's family
result.entity.middleNamestringThe middle name of the user
result.entity.lastNamestringThe last name of the user

Error Response Samples

{
"message": "id: Invalid id supplied, ",
"statusCode": 400,
"status": "failure",
"metaData": {
"requestId": "<Request_ID>",
"transactionId":"<Transaction_ID>"
}
}
{
"message": "Unable to validate ID",
"statusCode": 404,
"status": "failure",
"metaData": {
"requestId": "<Request_ID>",
"transactionId":"<Transaction_ID>"
}
}

Error Response Details

A failure or error response from the module contains a failure status, with a relavant status code and error message. The following table lists all error responses.

Status CodeError MessageError Description
400Missing required request parametersThe request has null or undefined input parameters
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid values
403Access DeniedPlease contact the HyperVerge team for resolution
500Internal Server ErrorPlease check the request headers or contact the HyperVerge team for resolution
503Server ErrorPlease contact the HyperVerge team for resolution
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: